TARGET = rpcclient
CXX = g++
CFLAGS = -g -Wall -std=c++11
HEAD_FLAGS = 
LIB_FLAGS = -L/home/zxf/openlib/grpc/lib -lgrpc++ -L/home/zxf/openlib/protobuf/lib -lprotobuf
SOURCE=$(wildcard *.cpp *.cc)
OBJS=$(patsubst %.cc, %.o, $(patsubst %.cpp, %.o, $(SOURCE)))

all: show $(TARGET)

show: 
	@echo "Compiling..."

$(TARGET): $(OBJS)
	@echo "Linking..."
	@$(CXX) $^ -o $@  $(LIB_FLAGS)

%.o : %.cc
	@$(CXX) -c $< -o $@ $(HEAD_FLAGS)
%.o : %.cpp
	@$(CXX) -c $< -o $@ $(HEAD_FLAGS)

clean: 
	-rm -rf *.o $(TARGET)

.PHONY: clean all show